package org.zhangsh.spring.beanpostprocessor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor;
import org.springframework.stereotype.Component;

/**
 * </p>
 *
 * @author zhangsh
 * @version 1.0.0
 * @since 2019-03-27
 */
@Component
public class DemoInstantiationAwareBeanPostProcessor implements InstantiationAwareBeanPostProcessor {

    public DemoInstantiationAwareBeanPostProcessor(){
        System.out.println("我是InstantiationAwareBeanPostProcessor init...");
    }

    @Override
    public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException {
//        System.out.println(beanName + "InstantiationAwareBeanPostProcessor(postProcessBeforeInstantiation)方法实例化...");
        return null;
    }
}
